package com.jeomo.bonus.controller.web;

import com.jeomo.common.core.result.CommonResult;
import com.jeomo.mem.api.IMemberCardApi;
import com.jeomo.mem.api.dto.MemberCardDto;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("bonus")
public class BonusController {

    @Resource
    IMemberCardApi memberCardApi;

    @RequestMapping("card/{code}")
    public MemberCardDto getCardInfo(String code) {
        CommonResult<MemberCardDto> result = memberCardApi.queryByCode(code);
        return result.getData();
    }

}
